1. Field of the Invention
Embodiments of the present invention generally relate to computer graphics processing, and more particularly, to a method and apparatus for unifying graphics processing unit computation languages.
2. Description of the Related Art
A graphics processing unit (GPU) is a processor optimized for accelerating computer graphics. GPU computation languages have been developed for rendering the GPUs on specific hardware and/or software platforms.
For example, a GPU method for rendering computer graphics built on NVIDIA's Compute Unified Device Architecture (CUDA) technology can only run on the NVIDIA hardware platform, while Open Computing Language (OpenCL) is a GPU computing language that may run on multiple platforms. In order to allow platform independent application and integration of GPUs having a platform dependency, the GPU's computation language platform dependency must be overcome.
One solution which would allow platform independent application and integration of the CUDA and OpenCL computing languages, for example, is to maintain parallel OpenCL and CUDA code bases. However, this solution requires a massive amount of duplicated code that becomes difficult to maintain. Another solution is to develop a new language or compiler that facilitates use of the functionality of both OpenCL and CUDA. However, this requires a significant commitment of time and expense to develop and test the new language. Another solution is to support only OpenCL, but that would require abandoning a significant amount of existing and well-tested CUDA code. Also, CUDA allows certain functionality on NVIDIA hardware, which functionality is not available through OpenCL.
Therefore, there is a need for a method and apparatus for unifying GPU computation languages.